package pl.nazaweb.jboot;

import java.awt.Point;

/**
 *
 * @author Marek Kawczyński
 */
public class PathFinder {

    private int[][] array;
    private Point startPoint;
    private Point endPoint;

    public PathFinder(int[][] array, Point startPoint, Point endPoint) {
        this.array = array;
        this.startPoint = startPoint;
        this.endPoint = endPoint;
    }

    public void findPath() {
        int increment = getIncrement();
        for(int x=startPoint.x;x<array.length;x++){
            for(int y=0;y<array[0].length;y++){
                        
            }
        }
        
    }

    public WayDirection getSearchDirection(int currentPointY) {
        if (endPoint.y > currentPointY) {
            return WayDirection.UP;
        }
        return WayDirection.DOWN;
    }

    private int getIncrement() {
        WayDirection direction = getSearchDirection(startPoint.y);
        if (direction.equals(WayDirection.DOWN)) {
            return -1;
        }
        return 1;
    }
}
